package service_base

import (
	"strings"
	"wrblog-api-go/app/dao/dao_base"
	"wrblog-api-go/app/model/model_base"
)

func GetArticleLabelPageList(baseArticleLabel model_base.SelectBaseArticleLabel) ([]model_base.BaseArticleLabelVo, int64, error) {
	return dao_base.GetArticleLabelPageList(baseArticleLabel)
}

func GetArticleLabelInfo(labelId int) (model_base.BaseArticleLabelVo, error) {
	return dao_base.GetArticleLabelInfo(labelId)
}

func AddArticleLabel(baseArticleLabel model_base.BaseArticleLabelPo) (int, error) {
	return dao_base.AddArticleLabel(baseArticleLabel)
}

func EditArticleLabel(baseArticleLabel model_base.BaseArticleLabelPo) (int64, error) {
	return dao_base.EditArticleLabel(baseArticleLabel)
}

// RemoveArticleLabel 逻辑删除
func RemoveArticleLabel(labelIds string, uk string) (int64, error) {
	return dao_base.RemoveArticleLabel(strings.Split(labelIds, ","), uk)
}
